Add hook in get_user_pages to allow lookups of foreign mapped pages.
authorakw27@arcadians.cl.cam.ac.uk <akw27@arcadians.cl.cam.ac.uk>
Mon, 4 Jul 2005 15:31:47 +0000 (15:31 +0000)
committerakw27@arcadians.cl.cam.ac.uk <akw27@arcadians.cl.cam.ac.uk>
Mon, 4 Jul 2005 15:31:47 +0000 (15:31 +0000)
commitc6961d4f4a5c67d9b47e6a58af823c569c0b2d34
tree392924f5455e1d1fcb4ce7ee673c6eb6ba0006a1
parentce17c4978228f33b4973c695abc37d7d8346f26e
Add hook in get_user_pages to allow lookups of foreign mapped pages.

Direct IO to userspace (e.g. with libaio) needs to map user virtual addresses
down to page structs.  This patch adds a new vma flag (VM_FOREIGN) to tell
get_user_pages that there are foreign frames in the vma.  If VM_FOREIGN is set
vm_private_data points to a map of struct page pointers, indicating the
physical page underpinning the vaddr.

After a fair bit of discussion with Keir, this seems to be the least
intrusive way to allow this sort of lookup.  If this solves things, we
can pull the VM_FOREIGN clause out into make it a noop on non-Xen
arches in the same way that the gate_area check above it is.
linux-2.6.11-xen-sparse/include/linux/mm.h [new file with mode: 0644]
linux-2.6.11-xen-sparse/mm/memory.c